<template>
    <div>
        <ul>
            <li v-for="(item, index) in lis" :key="index">
                <img :src="item.images[0]" alt="">
                <p>{{ item.name }}</p>
                <p>{{ item.phone }}</p>
            </li>
        </ul>
    </div>
</template>

<script>
import {stu_02} from "../api/student"
export default {
    data() {
        return {
            lis: []
        }
    },
    mounted() {
        this.stu(this.$route.query.id)
        // 获取到query的传的值
      
    },
   methods: {
    async stu(id) {
            let student = await stu_02(id);
            console.log(student);
            this.lis = student.data;
        }
    }

}
</script>

<style lang="scss" scoped>
ul {
    display: flex;
    flex-direction: column;

    img {
        width: 300px;
        height: 200px;
    }
}
</style>